<template>
  <el-dialog
      title="全文查看"
      :visible.sync="dialogVisible"
      :width="width"
      :height="height"
      :fullscreen="fullscreen"
  >
      <FilePreview id="filePreview" ref="filePreviewRef">

      </FilePreview>
  </el-dialog>
</template>

<script>
import FilePreview from "@/components/FilePreview/index.vue";

export default {
  components: {FilePreview},
  name: "FilePreviewDialog",
  data() {
    return {
      fullscreen: true,
      dialogVisible: false,
      width: "80%",
      height: "80%"
    };
  },
  methods: {
    showDialog(type, url, options) { // 展示dialog数据
      this.dialogVisible = true;
      this.$nextTick(() => {
        this.$refs.filePreviewRef.showFilePreview(type, url);
      })
    }
  }
};
</script>

<style scoped lang="scss">
  ::v-deep .el-dialog__body {
    height: calc(100% - 54px);
  }
</style>
